<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>cmdline - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / cmdline<br />
  <a name="top"></a><h1>cmdline - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="cmdline.html" name="cmdline.txt">cmdline.txt</a>&nbsp;&nbsp; For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2017 Jul 11<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Identifier">VIM REFERENCE MANUAL&nbsp;&nbsp;&nbsp;&nbsp;by Bram Moolenaar</span><br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#Cmdline-mode" name="Cmdline-mode">Cmdline-mode</a>&nbsp;<a class="Constant" href="cmdline.html#Command-line-mode" name="Command-line-mode">Command-line-mode</a><br>
Command-line mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#Cmdline" name="Cmdline">Cmdline</a>&nbsp;<a class="Constant" href="cmdline.html#Command-line" name="Command-line">Command-line</a>&nbsp;<a class="Constant" href="cmdline.html#mode-cmdline" name="mode-cmdline">mode-cmdline</a>&nbsp;<a class="Constant" href="cmdline.html#:" name=":">:</a><br>
<br>
Command-line mode is used to enter Ex commands (&quot;:&quot;), search patterns<br>
(&quot;/&quot; and &quot;?&quot;), and filter commands (&quot;!&quot;).<br>
<br>
Basic command line editing is explained in chapter 20 of the user manual<br>
<a class="Identifier" href="usr_20.html">usr_20.txt</a>.<br>
<br>
1. Command-line editing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-editing">cmdline-editing</a><br>
2. Command-line completion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a><br>
3. Ex command-lines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-lines">cmdline-lines</a><br>
4. Ex command-line ranges&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-ranges">cmdline-ranges</a><br>
5. Ex command-line flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#ex-flags">ex-flags</a><br>
6. Ex special characters&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-special">cmdline-special</a><br>
7. Command-line window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#cmdline-window">cmdline-window</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. Command-line editing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-editing" name="cmdline-editing">cmdline-editing</a><br>
<br>
Normally characters are inserted in front of the cursor position.&nbsp;&nbsp;You can<br>
move around in the command-line with the left and right cursor keys.&nbsp;&nbsp;With the<br>
<span class="Special">&lt;Insert&gt;</span>&nbsp;key, you can toggle between inserting and overstriking characters.<br>
<span class="Special">{Vi: can only alter the last character in the line}</span><br>
<br>
<span class="Todo">Note</span>&nbsp;that if your keyboard does not have working cursor keys or any of the<br>
other special keys, you can use &quot;:cnoremap&quot; to define another key for them.<br>
For example, to define tcsh style editing keys:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#tcsh-style" name="tcsh-style">tcsh-style</a>&nbsp;<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;C-A&gt; &lt;Home&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;C-F&gt; &lt;Right&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;C-B&gt; &lt;Left&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;Esc&gt;b &lt;S-Left&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;Esc&gt;f &lt;S-Right&gt;</div>
(&lt;&gt; notation&nbsp;<a class="Identifier" href="intro.html#<>">&lt;&gt;</a>; type all this literally)<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-too-long" name="cmdline-too-long">cmdline-too-long</a><br>
When the command line is getting longer than what fits on the screen, only the<br>
part that fits will be shown.&nbsp;&nbsp;The cursor can only move in this visible part,<br>
thus you cannot edit beyond that.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-history" name="cmdline-history">cmdline-history</a>&nbsp;<a class="Constant" href="cmdline.html#history" name="history">history</a><br>
The command-lines that you enter are remembered in a history table.&nbsp;&nbsp;You can<br>
recall them with the up and down cursor keys.&nbsp;&nbsp;There are actually five<br>
history tables:<br>
- one for ':' commands<br>
- one for search strings<br>
- one for expressions<br>
- one for input lines, typed for the&nbsp;<a class="Identifier" href="eval.html#input()">input()</a>&nbsp;function.<br>
- one for debug mode commands<br>
These are completely separate.&nbsp;&nbsp;Each history can only be accessed when<br>
entering the same type of line.<br>
Use the&nbsp;<a class="Type" href="options.html#'history'">'history'</a>&nbsp;option to set the number of lines that are remembered<br>
(default: 50).<br>
<span class="Todo">Notes</span>:<br>
- When you enter a command-line that is exactly the same as an older one, the<br>
&nbsp;&nbsp;old one is removed (to avoid repeated commands moving older commands out of<br>
&nbsp;&nbsp;the history).<br>
- Only commands that are typed are remembered.&nbsp;&nbsp;Ones that completely come from<br>
&nbsp;&nbsp;mappings are not put in the history.<br>
- All searches are put in the search history, including the ones that come<br>
&nbsp;&nbsp;from commands like &quot;*&quot; and &quot;#&quot;.&nbsp;&nbsp;But for a mapping, only the last search is<br>
&nbsp;&nbsp;remembered (to avoid that long mappings trash the history).<br>
<span class="Special">{Vi: no history}</span><br>
<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><span class="Special">&nbsp;feature}</span><br>
<br>
There is an automatic completion of names on the command-line; see<br>
<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-V" name="c_CTRL-V">c_CTRL-V</a><br>
<span class="Special">CTRL-V</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert next non-digit literally.&nbsp;&nbsp;Up to three digits form the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decimal value of a single byte.&nbsp;&nbsp;The non-digit and the three<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;digits are not considered for mapping.&nbsp;&nbsp;This works the same<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;way as in Insert mode (see above,&nbsp;<a class="Identifier" href="insert.html#i_CTRL-V">i_CTRL-V</a>).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>: Under Windows&nbsp;<span class="Special">CTRL-V</span>&nbsp;is often mapped to paste text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use&nbsp;<span class="Special">CTRL-Q</span>&nbsp;instead then.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-Q" name="c_CTRL-Q">c_CTRL-Q</a><br>
<span class="Special">CTRL-Q</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as&nbsp;<span class="Special">CTRL-V</span>.&nbsp;&nbsp;But with some terminals it is used for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;control flow, it doesn't work then.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Left>" name="c_&lt;Left&gt;">c_&lt;Left&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Left" name="c_Left">c_Left</a><br>
<span class="Special">&lt;Left&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor left<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Right>" name="c_&lt;Right&gt;">c_&lt;Right&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Right" name="c_Right">c_Right</a><br>
<span class="Special">&lt;Right&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cursor right<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<S-Left>" name="c_&lt;S-Left&gt;">c_&lt;S-Left&gt;</a><br>
<span class="Special">&lt;S-Left&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;C-Left&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<C-Left>" name="c_&lt;C-Left&gt;">c_&lt;C-Left&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor one WORD left<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<S-Right>" name="c_&lt;S-Right&gt;">c_&lt;S-Right&gt;</a><br>
<span class="Special">&lt;S-Right&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;C-Right&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<C-Right>" name="c_&lt;C-Right&gt;">c_&lt;C-Right&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor one WORD right<br>
<span class="Special">CTRL-B</span>&nbsp;or&nbsp;<span class="Special">&lt;Home&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-B" name="c_CTRL-B">c_CTRL-B</a>&nbsp;<a class="Constant" href="cmdline.html#c_<Home>" name="c_&lt;Home&gt;">c_&lt;Home&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Home" name="c_Home">c_Home</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor to beginning of command-line<br>
<span class="Special">CTRL-E</span>&nbsp;or&nbsp;<span class="Special">&lt;End&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-E" name="c_CTRL-E">c_CTRL-E</a>&nbsp;<a class="Constant" href="cmdline.html#c_<End>" name="c_&lt;End&gt;">c_&lt;End&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_End" name="c_End">c_End</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor to end of command-line<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<LeftMouse>" name="c_&lt;LeftMouse&gt;">c_&lt;LeftMouse&gt;</a><br>
<span class="Special">&lt;LeftMouse&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp; Move the cursor to the position of the mouse click.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<MiddleMouse>" name="c_&lt;MiddleMouse&gt;">c_&lt;MiddleMouse&gt;</a><br>
<span class="Special">&lt;MiddleMouse&gt;</span>&nbsp;&nbsp; Paste the contents of the clipboard (for X11 the primary<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selection).&nbsp;&nbsp;This is similar to using&nbsp;<span class="Special">CTRL-R</span>&nbsp;*, but no CR<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;characters are inserted between lines.<br>
<br>
<span class="Special">CTRL-H</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<BS>" name="c_&lt;BS&gt;">c_&lt;BS&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-H" name="c_CTRL-H">c_CTRL-H</a>&nbsp;<a class="Constant" href="cmdline.html#c_BS" name="c_BS">c_BS</a><br>
<span class="Special">&lt;BS&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the character in front of the cursor (see&nbsp;<a class="Identifier" href="options.html#:fixdel">:fixdel</a>&nbsp;if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;your&nbsp;<span class="Special">&lt;BS&gt;</span>&nbsp;key does not do what you want).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Del>" name="c_&lt;Del&gt;">c_&lt;Del&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Del" name="c_Del">c_Del</a><br>
<span class="Special">&lt;Del&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Delete the character under the cursor (at end of line:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character before the cursor) (see&nbsp;<a class="Identifier" href="options.html#:fixdel">:fixdel</a>&nbsp;if your&nbsp;<span class="Special">&lt;Del&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key does not do what you want).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-W" name="c_CTRL-W">c_CTRL-W</a><br>
<span class="Special">CTRL-W</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the&nbsp;<a class="Identifier" href="motion.html#word">word</a>&nbsp;before the cursor.&nbsp;&nbsp;This depends on the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'iskeyword'">'iskeyword'</a>&nbsp;option.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-U" name="c_CTRL-U">c_CTRL-U</a><br>
<span class="Special">CTRL-U</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all characters between the cursor position and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the beginning of the line.&nbsp;&nbsp;Previous versions of vim<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deleted all characters on the line.&nbsp;&nbsp;If that is the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;preferred behavior, add the following to your .vimrc:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap &lt;C-U&gt; &lt;C-E&gt;&lt;C-U&gt;</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Insert>" name="c_&lt;Insert&gt;">c_&lt;Insert&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Insert" name="c_Insert">c_Insert</a><br>
<span class="Special">&lt;Insert&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle between insert and overstrike.&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
<br>
<span class="Special">{char1}</span>&nbsp;<span class="Special">&lt;BS&gt;</span>&nbsp;<span class="Special">{char2}</span>&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_digraph" name="c_digraph">c_digraph</a><br>
<span class="Special">CTRL-K</span>&nbsp;<span class="Special">{char1}</span>&nbsp;<span class="Special">{char2}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-K" name="c_CTRL-K">c_CTRL-K</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enter digraph (see&nbsp;<a class="Identifier" href="digraph.html#digraphs">digraphs</a>).&nbsp;&nbsp;When&nbsp;<span class="Special">{char1}</span>&nbsp;is a special<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key, the code for that key is inserted in &lt;&gt; form.&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
<br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">{0-9a-z&quot;%#:-=.}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R" name="c_CTRL-R">c_CTRL-R</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>" name="c_&lt;C-R&gt;">c_&lt;C-R&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert the contents of a numbered or named register.&nbsp;&nbsp;Between<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typing&nbsp;<span class="Special">CTRL-R</span>&nbsp;and the second character '&quot;' will be displayed<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to indicate that you are expected to enter the name of a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The text is inserted as if you typed it, but mappings and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;abbreviations are not used.&nbsp;&nbsp;Command-line completion through<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;is not triggered though.&nbsp;&nbsp;And characters that end<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the command line are inserted literally (<span class="Special">&lt;Esc&gt;</span>,&nbsp;<span class="Special">&lt;CR&gt;</span>,&nbsp;<span class="Special">&lt;NL&gt;</span>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-C&gt;</span>).&nbsp;&nbsp;A&nbsp;<span class="Special">&lt;BS&gt;</span>&nbsp;or&nbsp;<span class="Special">CTRL-W</span>&nbsp;could still end the command line<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;though, and remaining characters will then be interpreted in<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;another mode, which might not be what you intended.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Special registers:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&quot;'&nbsp;&nbsp;&nbsp;&nbsp; the unnamed register, containing the text of<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the last delete or yank<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'%'&nbsp;&nbsp;&nbsp;&nbsp; the current file name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'#'&nbsp;&nbsp;&nbsp;&nbsp; the alternate file name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'*'&nbsp;&nbsp;&nbsp;&nbsp; the clipboard contents (X11: primary selection)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+'&nbsp;&nbsp;&nbsp;&nbsp; the clipboard contents<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/'&nbsp;&nbsp;&nbsp;&nbsp; the last search pattern<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;':'&nbsp;&nbsp;&nbsp;&nbsp; the last command-line<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'-'&nbsp;&nbsp;&nbsp;&nbsp; the last small (less than a line) delete<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.'&nbsp;&nbsp;&nbsp;&nbsp; the last inserted text<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_=" name="c_CTRL-R_=">c_CTRL-R_=</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'='&nbsp;&nbsp;&nbsp;&nbsp; the expression register: you are prompted to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enter an expression (see&nbsp;<a class="Identifier" href="eval.html#expression">expression</a>)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(doesn't work at the expression prompt; some<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;things such as changing the buffer or current<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window are not allowed to avoid side effects)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When the result is a&nbsp;<a class="Identifier" href="eval.html#List">List</a>&nbsp;the items are used<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as lines.&nbsp;&nbsp;They can have line breaks inside<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;too.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When the result is a Float it's automatically<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;converted to a String.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="change.html#registers">registers</a>&nbsp;about registers.&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Implementation detail: When using the&nbsp;<a class="Identifier" href="eval.html#expression">expression</a>&nbsp;register<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and invoking setcmdpos(), this sets the position before<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inserting the resulting string.&nbsp;&nbsp;Use&nbsp;<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-R</span>&nbsp;to set the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position afterwards.<br>
<br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-F</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-F" name="c_CTRL-R_CTRL-F">c_CTRL-R_CTRL-F</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-F>" name="c_&lt;C-R&gt;_&lt;C-F&gt;">c_&lt;C-R&gt;_&lt;C-F&gt;</a><br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-P</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-P" name="c_CTRL-R_CTRL-P">c_CTRL-R_CTRL-P</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-P>" name="c_&lt;C-R&gt;_&lt;C-P&gt;">c_&lt;C-R&gt;_&lt;C-P&gt;</a><br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-W</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-W" name="c_CTRL-R_CTRL-W">c_CTRL-R_CTRL-W</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-W>" name="c_&lt;C-R&gt;_&lt;C-W&gt;">c_&lt;C-R&gt;_&lt;C-W&gt;</a><br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-A</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-A" name="c_CTRL-R_CTRL-A">c_CTRL-R_CTRL-A</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-A>" name="c_&lt;C-R&gt;_&lt;C-A&gt;">c_&lt;C-R&gt;_&lt;C-A&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert the object under the cursor:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-F</span>&nbsp;&nbsp;the Filename under the cursor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-P</span>&nbsp;&nbsp;the Filename under the cursor, expanded with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'path'">'path'</a>&nbsp;as in&nbsp;<a class="Identifier" href="editing.html#gf">gf</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-W</span>&nbsp;&nbsp;the Word under the cursor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-A</span>&nbsp;&nbsp;the WORD under the cursor; see&nbsp;<a class="Identifier" href="motion.html#WORD">WORD</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;<a class="Type" href="options.html#'incsearch'">'incsearch'</a>&nbsp;is set the cursor position at the end of the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currently displayed match is used.&nbsp;&nbsp;With&nbsp;<span class="Special">CTRL-W</span>&nbsp;the part of<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the word that was already typed is not inserted again.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-F</span>&nbsp;and&nbsp;<span class="Special">CTRL-P</span>:&nbsp;<span class="Special">{only when&nbsp;</span><a class="Identifier" href="various.html#+file_in_path">+file_in_path</a><span class="Special">&nbsp;feature is</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">included}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-R" name="c_CTRL-R_CTRL-R">c_CTRL-R_CTRL-R</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-R>" name="c_&lt;C-R&gt;_&lt;C-R&gt;">c_&lt;C-R&gt;_&lt;C-R&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-R_CTRL-O" name="c_CTRL-R_CTRL-O">c_CTRL-R_CTRL-O</a>&nbsp;<a class="Constant" href="cmdline.html#c_<C-R>_<C-O>" name="c_&lt;C-R&gt;_&lt;C-O&gt;">c_&lt;C-R&gt;_&lt;C-O&gt;</a><br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-R</span>&nbsp;{0-9a-z&quot;%#:-=.&nbsp;<span class="Special">CTRL-F</span>&nbsp;<span class="Special">CTRL-P</span>&nbsp;<span class="Special">CTRL-W</span>&nbsp;<span class="Special">CTRL-A</span>}<br>
<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-O</span>&nbsp;{0-9a-z&quot;%#:-=.&nbsp;<span class="Special">CTRL-F</span>&nbsp;<span class="Special">CTRL-P</span>&nbsp;<span class="Special">CTRL-W</span>&nbsp;<span class="Special">CTRL-A</span>}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert register or object under the cursor.&nbsp;&nbsp;Works like<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="cmdline.html#c_CTRL-R">c_CTRL-R</a>&nbsp;but inserts the text literally.&nbsp;&nbsp;For example, if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register a contains &quot;xy^Hz&quot; (where ^H is a backspace),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;<span class="Special">CTRL-R</span>&nbsp;a&quot; will insert &quot;xz&quot; while &quot;<span class="Special">CTRL-R</span>&nbsp;<span class="Special">CTRL-R</span>&nbsp;a&quot; will<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert &quot;xy^Hz&quot;.<br>
<br>
<span class="Special">CTRL-\</span>&nbsp;e&nbsp;<span class="Special">{expr}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-\_e" name="c_CTRL-\_e">c_CTRL-\_e</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluate&nbsp;<span class="Special">{expr}</span>&nbsp;and replace the whole command line with the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.&nbsp;&nbsp;You will be prompted for the expression, type&nbsp;<span class="Special">&lt;Enter&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to finish it.&nbsp;&nbsp;It's most useful in mappings though.&nbsp;&nbsp;See<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="eval.html#expression">expression</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="cmdline.html#c_CTRL-R_=">c_CTRL-R_=</a>&nbsp;for inserting the result of an expression.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Useful functions are&nbsp;<a class="Identifier" href="eval.html#getcmdtype()">getcmdtype()</a>,&nbsp;<a class="Identifier" href="eval.html#getcmdline()">getcmdline()</a>&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="eval.html#getcmdpos()">getcmdpos()</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The cursor position is unchanged, except when the cursor was<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at the end of the line, then it stays at the end.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="eval.html#setcmdpos()">setcmdpos()</a>&nbsp;can be used to set the cursor position.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;<a class="Identifier" href="eval.html#sandbox">sandbox</a>&nbsp;is used for evaluating the expression to avoid<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nasty side effects.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cmap &lt;F7&gt; &lt;C-\&gt;eAppendSome()&lt;CR&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:func AppendSome()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :let cmd = getcmdline() . &quot; Some()&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&quot; place the cursor on the )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :call setcmdpos(strlen(cmd))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :return cmd<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:endfunc</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This doesn't work recursively, thus not when already editing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an expression.&nbsp;&nbsp;But it is possible to use in a mapping.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-Y" name="c_CTRL-Y">c_CTRL-Y</a><br>
<span class="Special">CTRL-Y</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When there is a modeless selection, copy the selection into<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the clipboard.&nbsp;<a class="Identifier" href="gui.html#modeless-selection">modeless-selection</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there is no selection&nbsp;<span class="Special">CTRL-Y</span>&nbsp;is inserted as a character.<br>
<br>
<span class="Special">CTRL-M</span>&nbsp;or&nbsp;<span class="Special">CTRL-J</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-M" name="c_CTRL-M">c_CTRL-M</a>&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-J" name="c_CTRL-J">c_CTRL-J</a>&nbsp;<a class="Constant" href="cmdline.html#c_<NL>" name="c_&lt;NL&gt;">c_&lt;NL&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_<CR>" name="c_&lt;CR&gt;">c_&lt;CR&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_CR" name="c_CR">c_CR</a><br>
<span class="Special">&lt;CR&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;NL&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;start entered command<br>
<br>
<span class="Special">CTRL-[</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-[" name="c_CTRL-[">c_CTRL-[</a>&nbsp;<a class="Constant" href="cmdline.html#c_<Esc>" name="c_&lt;Esc&gt;">c_&lt;Esc&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Esc" name="c_Esc">c_Esc</a><br>
<span class="Special">&lt;Esc&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When typed and 'x' not present in&nbsp;<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>, quit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Command-line mode without executing.&nbsp;&nbsp;In macros or when 'x'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;present in&nbsp;<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>, start entered command.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>: If your&nbsp;<span class="Special">&lt;Esc&gt;</span>&nbsp;key is hard to hit on your keyboard, train<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself to use&nbsp;<span class="Special">CTRL-[</span>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-C" name="c_CTRL-C">c_CTRL-C</a><br>
<span class="Special">CTRL-C</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit command-line without executing<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Up>" name="c_&lt;Up&gt;">c_&lt;Up&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Up" name="c_Up">c_Up</a><br>
<span class="Special">&lt;Up&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recall older command-line from history, whose beginning<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches the current command-line (see below).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">feature}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<Down>" name="c_&lt;Down&gt;">c_&lt;Down&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_Down" name="c_Down">c_Down</a><br>
<span class="Special">&lt;Down&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recall more recent command-line from history, whose beginning<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches the current command-line (see below).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">feature}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<S-Up>" name="c_&lt;S-Up&gt;">c_&lt;S-Up&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_<PageUp>" name="c_&lt;PageUp&gt;">c_&lt;PageUp&gt;</a><br>
<span class="Special">&lt;S-Up&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;PageUp&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recall older command-line from history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">feature}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_<S-Down>" name="c_&lt;S-Down&gt;">c_&lt;S-Down&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_<PageDown>" name="c_&lt;PageDown&gt;">c_&lt;PageDown&gt;</a><br>
<span class="Special">&lt;S-Down&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;PageDown&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recall more recent command-line from history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">feature}</span><br>
<br>
<span class="Special">CTRL-D</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;option<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<span class="Special">CTRL-N</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<span class="Special">CTRL-P</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<span class="Special">CTRL-A</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<span class="Special">CTRL-L</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line completion (see&nbsp;<a class="Identifier" href="cmdline.html#cmdline-completion">cmdline-completion</a>)<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-_" name="c_CTRL-_">c_CTRL-_</a><br>
<span class="Special">CTRL-_</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a - switch between Hebrew and English keyboard mode, which is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private to the command-line and not related to hkmap.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is useful when Hebrew text entry is required in the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command-line, searches, abbreviations, etc.&nbsp;&nbsp;Applies only if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim is compiled with the&nbsp;<a class="Identifier" href="various.html#+rightleft">+rightleft</a>&nbsp;feature and the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'allowrevins'">'allowrevins'</a>&nbsp;option is set.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="rileft.html">rileft.txt</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b - switch between Farsi and English keyboard mode, which is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private to the command-line and not related to fkmap.&nbsp;&nbsp;In<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Farsi keyboard mode the characters are inserted in reverse<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert manner.&nbsp;&nbsp;This is useful when Farsi text entry is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required in the command-line, searches, abbreviations, etc.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies only if Vim is compiled with the&nbsp;<a class="Identifier" href="various.html#+farsi">+farsi</a>&nbsp;feature.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="farsi.html">farsi.txt</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-^" name="c_CTRL-^">c_CTRL-^</a><br>
<span class="Special">CTRL-^</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle the use of language&nbsp;<a class="Identifier" href="map.html#:lmap">:lmap</a>&nbsp;mappings and/or Input<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When typing a pattern for a search command and&nbsp;<a class="Type" href="options.html#'imsearch'">'imsearch'</a>&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not -1, VAL is the value of&nbsp;<a class="Type" href="options.html#'imsearch'">'imsearch'</a>, otherwise VAL is the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value of&nbsp;<a class="Type" href="options.html#'iminsert'">'iminsert'</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When language mappings are defined:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- If VAL is 1 (langmap mappings used) it becomes 0 (no langmap<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mappings used).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- If VAL was not 1 it becomes 1, thus langmap mappings are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When no language mappings are defined:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- If VAL is 2 (Input Method is used) it becomes 0 (no input<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;method used)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- If VAL has another value it becomes 2, thus the Input Method<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is enabled.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;These language mappings are normally used to type characters<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that are different from what the keyboard produces.&nbsp;&nbsp;The<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'keymap'">'keymap'</a>&nbsp;option can be used to install a whole number of them.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When entering a command line, langmap mappings are switched<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;off, since you are expected to type a command.&nbsp;&nbsp;After<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;switching it on with&nbsp;<span class="Special">CTRL-^</span>, the new state is not used again<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for the next command or Search pattern.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-]" name="c_CTRL-]">c_CTRL-]</a><br>
<span class="Special">CTRL-]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trigger abbreviation, without inserting a character.&nbsp;&nbsp;<span class="Special">{not in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">Vi}</span><br>
<br>
For Emacs-style editing on the command-line see&nbsp;<a class="Identifier" href="tips.html#emacs-keys">emacs-keys</a>.<br>
<br>
The&nbsp;<span class="Special">&lt;Up&gt;</span>&nbsp;and&nbsp;<span class="Special">&lt;Down&gt;</span>&nbsp;keys take the current command-line as a search string.<br>
The beginning of the next/previous command-lines are compared with this<br>
string.&nbsp;&nbsp;The first line that matches is the new command-line.&nbsp;&nbsp;When typing<br>
these two keys repeatedly, the same string is used again.&nbsp;&nbsp;For example, this<br>
can be used to find the previous substitute command: Type &quot;:s&quot; and then&nbsp;<span class="Special">&lt;Up&gt;</span>.<br>
The same could be done by typing&nbsp;<span class="Special">&lt;S-Up&gt;</span>&nbsp;a number of times until the desired<br>
command-line is shown.&nbsp;&nbsp;(<span class="Todo">Note</span>: the shifted arrow keys do not work on all<br>
terminals)<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:his" name=":his">:his</a>&nbsp;<a class="Constant" href="cmdline.html#:history" name=":history">:history</a><br>
:his[tory]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the history of last entered commands.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">feature}</span><br>
<br>
:his[tory] [<span class="Special">{name}</span>] [<span class="Special">{first}</span>][, [<span class="Special">{last}</span>]]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List the contents of history&nbsp;<span class="Special">{name}</span>&nbsp;which can be:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c[md]&nbsp;&nbsp;&nbsp;&nbsp;or :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command-line history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s[earch] or / or ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;search string history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e[xpr]&nbsp;&nbsp; or =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expression register history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i[nput]&nbsp;&nbsp;or @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input line history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d[ebug]&nbsp;&nbsp;or &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug command history<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a[ll]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all of the above<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{not in Vi}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the numbers&nbsp;<span class="Special">{first}</span>&nbsp;and/or&nbsp;<span class="Special">{last}</span>&nbsp;are given, the respective<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;range of entries from a history is listed.&nbsp;&nbsp;These numbers can<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be specified in the following form:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:history-indexing" name=":history-indexing">:history-indexing</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A positive number represents the absolute index of an entry<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;as it is given in the first column of a :history listing.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This number remains fixed even if other entries are deleted.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A negative number means the relative position of an entry,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;counted from the newest entry (which has index -1) backwards.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Examples:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List entries 6 to 12 from the search history:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:history / 6,12</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List the penultimate entry from all histories:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:history all -2</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List the most recent two entries from all histories:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:history all -2,</div>
<br>
:keepp[atterns]&nbsp;<span class="Special">{command}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:keepp" name=":keepp">:keepp</a>&nbsp;<a class="Constant" href="cmdline.html#:keeppatterns" name=":keeppatterns">:keeppatterns</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute&nbsp;<span class="Special">{command}</span>, without adding anything to the search<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;history<br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. Command-line completion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-completion" name="cmdline-completion">cmdline-completion</a><br>
<br>
When editing the command-line, a few commands can be used to complete the<br>
word before the cursor.&nbsp;&nbsp;This is available for:<br>
<br>
- Command names: At the start of the command-line.<br>
- Tags: Only after the &quot;:tag&quot; command.<br>
- File names: Only after a command that accepts a file name or a setting for<br>
&nbsp;&nbsp;an option that can be set to a file name.&nbsp;&nbsp;This is called file name<br>
&nbsp;&nbsp;completion.<br>
- Shell command names: After &quot;:!cmd&quot;, &quot;:r !cmd&quot; and &quot;:w !cmd&quot;.&nbsp;&nbsp;$PATH is used.<br>
- Options: Only after the &quot;:set&quot; command.<br>
- Mappings: Only after a &quot;:map&quot; or similar command.<br>
- Variable and function names: Only after a &quot;:if&quot;, &quot;:call&quot; or similar command.<br>
<br>
When Vim was compiled without the&nbsp;<a class="Identifier" href="various.html#+cmdline_compl">+cmdline_compl</a>&nbsp;feature only file names,<br>
directories and help items can be completed.&nbsp;&nbsp;The number of help item matches<br>
is limited (currently to 300) to avoid a long delay when there are very many<br>
matches.<br>
<br>
These are the commands that can be used:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-D" name="c_CTRL-D">c_CTRL-D</a><br>
<span class="Special">CTRL-D</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List names that match the pattern in front of the cursor.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When showing file names, directories are highlighted (see<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'highlight'">'highlight'</a>&nbsp;option).&nbsp;&nbsp;Names where&nbsp;<a class="Type" href="options.html#'suffixes'">'suffixes'</a>&nbsp;matches are moved<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to the end.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;<a class="Type" href="options.html#'wildoptions'">'wildoptions'</a>&nbsp;option can be set to &quot;tagfile&quot; to list the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file of matching tags.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-I" name="c_CTRL-I">c_CTRL-I</a>&nbsp;<a class="Constant" href="cmdline.html#c_wildchar" name="c_wildchar">c_wildchar</a>&nbsp;<a class="Constant" href="cmdline.html#c_<Tab>" name="c_&lt;Tab&gt;">c_&lt;Tab&gt;</a><br>
<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;option<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A match is done on the pattern in front of the cursor.&nbsp;&nbsp;The<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match (if there are several, the first match) is inserted<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in place of the pattern.&nbsp;&nbsp;(<span class="Todo">Note</span>: does not work inside a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;macro, because&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;or&nbsp;<span class="Special">&lt;Esc&gt;</span>&nbsp;are mostly used as&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and these have a special meaning in some macros.) When typed<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;again and there were multiple matches, the next<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match is inserted.&nbsp;&nbsp;After the last match, the first is used<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;again (wrap around).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The behavior can be changed with the&nbsp;<a class="Type" href="options.html#'wildmode'">'wildmode'</a>&nbsp;option.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-N" name="c_CTRL-N">c_CTRL-N</a><br>
<span class="Special">CTRL-N</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After using&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;which got multiple matches, go to next<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match.&nbsp;&nbsp;Otherwise recall more recent command-line from history.<br>
<span class="Special">&lt;S-Tab&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-P" name="c_CTRL-P">c_CTRL-P</a>&nbsp;<a class="Constant" href="cmdline.html#c_<S-Tab>" name="c_&lt;S-Tab&gt;">c_&lt;S-Tab&gt;</a><br>
<span class="Special">CTRL-P</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After using&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;which got multiple matches, go to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previous match.&nbsp;&nbsp;Otherwise recall older command-line from<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;history.&nbsp;&nbsp;<span class="Special">&lt;S-Tab&gt;</span>&nbsp;only works with the GUI, on the Amiga and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with MS-DOS.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-A" name="c_CTRL-A">c_CTRL-A</a><br>
<span class="Special">CTRL-A</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All names that match the pattern in front of the cursor are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inserted.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-L" name="c_CTRL-L">c_CTRL-L</a><br>
<span class="Special">CTRL-L</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A match is done on the pattern in front of the cursor.&nbsp;&nbsp;If<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;there is one match, it is inserted in place of the pattern.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there are multiple matches the longest common part is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inserted in place of the pattern.&nbsp;&nbsp;If the result is shorter<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;than the pattern, no completion is done.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#/_CTRL-L" name="/_CTRL-L">/_CTRL-L</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;<a class="Type" href="options.html#'incsearch'">'incsearch'</a>&nbsp;is set, entering a search pattern for &quot;/&quot; or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;?&quot; and the current match is displayed then&nbsp;<span class="Special">CTRL-L</span>&nbsp;will add<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;one character from the end of the current match.&nbsp;&nbsp;If<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'ignorecase'">'ignorecase'</a>&nbsp;and&nbsp;<a class="Type" href="options.html#'smartcase'">'smartcase'</a>&nbsp;are set and the command line has<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no uppercase characters, the added character is converted to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowercase.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-G" name="c_CTRL-G">c_CTRL-G</a>&nbsp;<a class="Constant" href="cmdline.html#/_CTRL-G" name="/_CTRL-G">/_CTRL-G</a><br>
<span class="Special">CTRL-G</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;<a class="Type" href="options.html#'incsearch'">'incsearch'</a>&nbsp;is set, entering a search pattern for &quot;/&quot; or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;?&quot; and the current match is displayed then&nbsp;<span class="Special">CTRL-G</span>&nbsp;will move<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to the next match (does not take&nbsp;<a class="Identifier" href="pattern.html#search-offset">search-offset</a>&nbsp;into account)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use&nbsp;<span class="Special">CTRL-T</span>&nbsp;to move to the previous match.&nbsp;&nbsp;Hint: on a regular<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keyboard T is above G.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_CTRL-T" name="c_CTRL-T">c_CTRL-T</a>&nbsp;<a class="Constant" href="cmdline.html#/_CTRL-T" name="/_CTRL-T">/_CTRL-T</a><br>
<span class="Special">CTRL-T</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;<a class="Type" href="options.html#'incsearch'">'incsearch'</a>&nbsp;is set, entering a search pattern for &quot;/&quot; or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;?&quot; and the current match is displayed then&nbsp;<span class="Special">CTRL-T</span>&nbsp;will move<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to the previous match (does not take&nbsp;<a class="Identifier" href="pattern.html#search-offset">search-offset</a>&nbsp;into<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;account).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use&nbsp;<span class="Special">CTRL-G</span>&nbsp;to move to the next match.&nbsp;&nbsp;Hint: on a regular<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keyboard T is above G.<br>
<br>
The&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;option defaults to&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;(<span class="Special">CTRL-E</span>&nbsp;when in Vi compatible mode; in<br>
a previous version&nbsp;<span class="Special">&lt;Esc&gt;</span>&nbsp;was used).&nbsp;&nbsp;In the pattern standard wildcards '*' and<br>
'?' are accepted when matching file names.&nbsp;&nbsp;'*' matches any string, '?'<br>
matches exactly one character.<br>
<br>
The&nbsp;<a class="Type" href="options.html#'wildignorecase'">'wildignorecase'</a>&nbsp;option can be set to ignore case in filenames.<br>
<br>
The&nbsp;<a class="Type" href="options.html#'wildmenu'">'wildmenu'</a>&nbsp;option can be set to show the matches just above the command<br>
line.<br>
<br>
If you like tcsh's autolist completion, you can use this mapping:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cnoremap X&nbsp;<span class="Special">&lt;C-L&gt;&lt;C-D&gt;</span><br>
(Where X is the command key to use,&nbsp;<span class="Special">&lt;C-L&gt;</span>&nbsp;is&nbsp;<span class="Special">CTRL-L</span>&nbsp;and&nbsp;<span class="Special">&lt;C-D&gt;</span>&nbsp;is&nbsp;<span class="Special">CTRL-D</span>)<br>
This will find the longest match and then list all matching files.<br>
<br>
If you like tcsh's autolist completion, you can use the&nbsp;<a class="Type" href="options.html#'wildmode'">'wildmode'</a>&nbsp;option to<br>
emulate it.&nbsp;&nbsp;For example, this mimics autolist=ambiguous:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set wildmode=longest,list<br>
This will find the longest match with the first&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>, then list all<br>
matching files with the next.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#suffixes" name="suffixes">suffixes</a><br>
For file name completion you can use the&nbsp;<a class="Type" href="options.html#'suffixes'">'suffixes'</a>&nbsp;option to set a priority<br>
between files with almost the same name.&nbsp;&nbsp;If there are multiple matches,<br>
those files with an extension that is in the&nbsp;<a class="Type" href="options.html#'suffixes'">'suffixes'</a>&nbsp;option are ignored.<br>
The default is &quot;.bak,~,.o,.h,.info,.swp,.obj&quot;, which means that files ending<br>
in &quot;.bak&quot;, &quot;~&quot;, &quot;.o&quot;, &quot;.h&quot;, &quot;.info&quot;, &quot;.swp&quot; and &quot;.obj&quot; are sometimes ignored.<br>
<br>
An empty entry, two consecutive commas, match a file name that does not<br>
contain a &quot;.&quot;, thus has no suffix.&nbsp;&nbsp;This is useful to ignore &quot;prog&quot; and prefer<br>
&quot;prog.c&quot;.<br>
<br>
Examples:<br>
<br>
&nbsp;&nbsp;<span class="PreProc">pattern:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match:</span><br>
&nbsp;&nbsp; test*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.c test.h test.o&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.c<br>
&nbsp;&nbsp; test*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.h test.o&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test.h and test.o<br>
&nbsp;&nbsp; test*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.i test.h test.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.i and test.c<br>
<br>
It is impossible to ignore suffixes with two dots.<br>
<br>
If there is more than one matching file (after ignoring the ones matching<br>
the&nbsp;<a class="Type" href="options.html#'suffixes'">'suffixes'</a>&nbsp;option) the first file name is inserted.&nbsp;&nbsp;You can see that<br>
there is only one match when you type&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;twice and the completed<br>
match stays the same.&nbsp;&nbsp;You can get to the other matches by entering<br>
<a class="Type" href="options.html#'wildchar'">'wildchar'</a>,&nbsp;<span class="Special">CTRL-N</span>&nbsp;or&nbsp;<span class="Special">CTRL-P</span>.&nbsp;&nbsp;All files are included, also the ones with<br>
extensions matching the&nbsp;<a class="Type" href="options.html#'suffixes'">'suffixes'</a>&nbsp;option.<br>
<br>
To completely ignore files with some extension use&nbsp;<a class="Type" href="options.html#'wildignore'">'wildignore'</a>.<br>
<br>
To match only files that end at the end of the typed text append a &quot;$&quot;.&nbsp;&nbsp;For<br>
example, to match only files that end in &quot;.c&quot;:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e *.c$</div>
This will not match a file ending in &quot;.cpp&quot;.&nbsp;&nbsp;Without the &quot;$&quot; it does match.<br>
<br>
The old value of an option can be obtained by hitting&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;just after<br>
the '='.&nbsp;&nbsp;For example, typing&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;after &quot;:set dir=&quot; will insert the<br>
current value of&nbsp;<a class="Type" href="options.html#'dir'">'dir'</a>.&nbsp;&nbsp;This overrules file name completion for the options<br>
that take a file name.<br>
<br>
If you would like using&nbsp;<span class="Special">&lt;S-Tab&gt;</span>&nbsp;for&nbsp;<span class="Special">CTRL-P</span>&nbsp;in an xterm, put this command in<br>
your .cshrc:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmodmap -e &quot;keysym Tab = Tab Find&quot;</div>
And this in your .vimrc:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cmap &lt;Esc&gt;[1~ &lt;C-P&gt;</div>
<br>
<span class="PreProc">==============================================================================</span><br>
3. Ex command-lines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-lines" name="cmdline-lines">cmdline-lines</a><br>
<br>
The Ex commands have a few specialties:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:quote" name=":quote">:quote</a>&nbsp;<a class="Constant" href="cmdline.html#:comment" name=":comment">:comment</a><br>
'&quot;' at the start of a line causes the whole line to be ignored.&nbsp;&nbsp;'&quot;'<br>
after a command causes the rest of the line to be ignored.&nbsp;&nbsp;This can be used<br>
to add comments.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set ai&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;set 'autoindent' option</div>
It is not possible to add a comment to a shell command &quot;:!cmd&quot; or to the<br>
&quot;:map&quot; command and a few others, because they see the '&quot;' as part of their<br>
argument.&nbsp;&nbsp;This is mentioned where the command is explained.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:bar" name=":bar">:bar</a>&nbsp;<a class="Constant" href="cmdline.html#:\bar" name=":\bar">:\bar</a><br>
'|' can be used to separate commands, so you can give multiple commands in one<br>
line.&nbsp;&nbsp;If you want to use '|' in an argument, precede it with '\'.<br>
<br>
These commands see the '|' as their argument, and can therefore not be<br>
followed by another Vim command:<br>
&nbsp;&nbsp;&nbsp;&nbsp;:argdo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:autocmd<br>
&nbsp;&nbsp;&nbsp;&nbsp;:bufdo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:cdo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:cfdo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:command<br>
&nbsp;&nbsp;&nbsp;&nbsp;:cscope<br>
&nbsp;&nbsp;&nbsp;&nbsp;:debug<br>
&nbsp;&nbsp;&nbsp;&nbsp;:folddoopen<br>
&nbsp;&nbsp;&nbsp;&nbsp;:folddoclosed<br>
&nbsp;&nbsp;&nbsp;&nbsp;:function<br>
&nbsp;&nbsp;&nbsp;&nbsp;:global<br>
&nbsp;&nbsp;&nbsp;&nbsp;:help<br>
&nbsp;&nbsp;&nbsp;&nbsp;:helpfind<br>
&nbsp;&nbsp;&nbsp;&nbsp;:lcscope<br>
&nbsp;&nbsp;&nbsp;&nbsp;:ldo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:lfdo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:make<br>
&nbsp;&nbsp;&nbsp;&nbsp;:normal<br>
&nbsp;&nbsp;&nbsp;&nbsp;:perl<br>
&nbsp;&nbsp;&nbsp;&nbsp;:perldo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:promptfind<br>
&nbsp;&nbsp;&nbsp;&nbsp;:promptrepl<br>
&nbsp;&nbsp;&nbsp;&nbsp;:pyfile<br>
&nbsp;&nbsp;&nbsp;&nbsp;:python<br>
&nbsp;&nbsp;&nbsp;&nbsp;:registers<br>
&nbsp;&nbsp;&nbsp;&nbsp;:read !<br>
&nbsp;&nbsp;&nbsp;&nbsp;:scscope<br>
&nbsp;&nbsp;&nbsp;&nbsp;:sign<br>
&nbsp;&nbsp;&nbsp;&nbsp;:tcl<br>
&nbsp;&nbsp;&nbsp;&nbsp;:tcldo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:tclfile<br>
&nbsp;&nbsp;&nbsp;&nbsp;:vglobal<br>
&nbsp;&nbsp;&nbsp;&nbsp;:windo<br>
&nbsp;&nbsp;&nbsp;&nbsp;:write !<br>
&nbsp;&nbsp;&nbsp;&nbsp;:<span class="Special">[range]</span>!<br>
&nbsp;&nbsp;&nbsp;&nbsp;a user defined command without the &quot;-bar&quot; argument&nbsp;<a class="Identifier" href="map.html#:command">:command</a><br>
<br>
<span class="Todo">Note</span>&nbsp;that this is confusing (inherited from Vi): With &quot;:g&quot; the '|' is included<br>
in the command, with &quot;:s&quot; it is not.<br>
<br>
To be able to use another command anyway, use the &quot;:execute&quot; command.<br>
Example (append the output of &quot;ls&quot; and jump to the first line):<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:execute 'r !ls' | '[</div>
<br>
There is one exception: When the 'b' flag is present in&nbsp;<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>, with the<br>
&quot;:map&quot; and &quot;:abbr&quot; commands and friends&nbsp;<span class="Special">CTRL-V</span>&nbsp;needs to be used instead of<br>
'\'.&nbsp;&nbsp;You can also use &quot;<span class="Special">&lt;Bar&gt;</span>&quot; instead.&nbsp;&nbsp;See also&nbsp;<a class="Identifier" href="map.html#map_bar">map_bar</a>.<br>
<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:!ls | wc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; view the output of two commands<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:r !ls | wc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the same output in the text<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:%g/foo/p|&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; moves all matching lines one shiftwidth<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:%s/foo/bar/|&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moves one line one shiftwidth<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:map q 10^V|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map &quot;q&quot; to &quot;10|&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:map q 10\| map \ l&nbsp;&nbsp;&nbsp;&nbsp; map &quot;q&quot; to &quot;10\&quot; and map &quot;\&quot; to &quot;l&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when 'b' is present in 'cpoptions')</div>
<br>
You can also use&nbsp;<span class="Special">&lt;NL&gt;</span>&nbsp;to separate commands in the same way as with '|'.&nbsp;&nbsp;To<br>
insert a&nbsp;<span class="Special">&lt;NL&gt;</span>&nbsp;use&nbsp;<span class="Special">CTRL-V</span>&nbsp;<span class="Special">CTRL-J</span>.&nbsp;&nbsp;&quot;^@&quot; will be shown.&nbsp;&nbsp;Using '|' is the<br>
preferred method.&nbsp;&nbsp;But for external commands a&nbsp;<span class="Special">&lt;NL&gt;</span>&nbsp;must be used, because a<br>
'|' is included in the external command.&nbsp;&nbsp;To avoid the special meaning of&nbsp;<span class="Special">&lt;NL&gt;</span><br>
it must be preceded with a backslash.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:r !date&lt;NL&gt;-join</div>
This reads the current date into the file and joins it with the previous line.<br>
<br>
<span class="Todo">Note</span>&nbsp;that when the command before the '|' generates an error, the following<br>
commands will not be executed.<br>
<br>
<br>
Because of Vi compatibility the following strange commands are supported:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print current line (like &quot;:p&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:3|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print line 3 (like &quot;:3p&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goto line 3</div>
<br>
A colon is allowed between the range and the command name.&nbsp;&nbsp;It is ignored<br>
(this is Vi compatible).&nbsp;&nbsp;For example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:1,$:s/pat/string</div>
<br>
When the character '%' or '#' is used where a file name is expected, they are<br>
expanded to the current and alternate file name (see the chapter &quot;editing<br>
files&quot;&nbsp;<a class="Identifier" href="cmdline.html#:_%">:_%</a>&nbsp;<a class="Identifier" href="cmdline.html#:_#">:_#</a>).<br>
<br>
Embedded spaces in file names are allowed on the Amiga if one file name is<br>
expected as argument.&nbsp;&nbsp;Trailing spaces will be ignored, unless escaped with a<br>
backslash or&nbsp;<span class="Special">CTRL-V</span>.&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that the &quot;:next&quot; command uses spaces to separate<br>
file names.&nbsp;&nbsp;Escape the spaces to include them in a file name.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:next foo\ bar goes\ to school\</div>
starts editing the three files &quot;foo bar&quot;, &quot;goes to&quot; and &quot;school &quot;.<br>
<br>
When you want to use the special characters '&quot;' or '|' in a command, or want<br>
to use '%' or '#' in a file name, precede them with a backslash.&nbsp;&nbsp;The<br>
backslash is not required in a range and in the &quot;:substitute&quot; command.<br>
See also&nbsp;<a class="Identifier" href="editing.html#`=">`=</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_!" name=":_!">:_!</a><br>
The '!' (bang) character after an Ex command makes the command behave in a<br>
different way.&nbsp;&nbsp;The '!' should be placed immediately after the command, without<br>
any blanks in between.&nbsp;&nbsp;If you insert blanks the '!' will be seen as an<br>
argument for the command, which has a different meaning.&nbsp;&nbsp;For example:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:w! name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write the current buffer to file &quot;name&quot;, overwriting<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any existing file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:w !name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;send the current buffer as standard input to command<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;name&quot;<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. Ex command-line ranges&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-ranges" name="cmdline-ranges">cmdline-ranges</a>&nbsp;<a class="Constant" href="cmdline.html#[range]" name="[range]">[range]</a>&nbsp;<a class="Constant" href="cmdline.html#E16" name="E16">E16</a><br>
<br>
Some Ex commands accept a line range in front of them.&nbsp;&nbsp;This is noted as<br>
<span class="Special">[range]</span>.&nbsp;&nbsp;It consists of one or more line specifiers, separated with ',' or<br>
';'.<br>
<br>
The basics are explained in section&nbsp;<a class="Identifier" href="usr_10.html#10.3">10.3</a>&nbsp;of the user manual.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:," name=":,">:,</a>&nbsp;<a class="Constant" href="cmdline.html#:;" name=":;">:;</a><br>
When separated with ';' the cursor position will be set to that line<br>
before interpreting the next line specifier.&nbsp;&nbsp;This doesn't happen for ','.<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp; 4,/this line/</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from line 4 till match with &quot;this line&quot; after the cursor line.<br>
<div class="helpExample">&nbsp;&nbsp; 5;/that line/</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from line 5 till match with &quot;that line&quot; after line 5.<br>
<br>
The default line specifier for most commands is the cursor position, but the<br>
commands &quot;:write&quot; and &quot;:global&quot; have the whole file (1,$) as default.<br>
<br>
If more line specifiers are given than required for the command, the first<br>
one(s) will be ignored.<br>
<br>
Line numbers may be specified with:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:range" name=":range">:range</a>&nbsp;<a class="Constant" href="cmdline.html#E14" name="E14">E14</a>&nbsp;<a class="Constant" href="cmdline.html#{address}" name="{address}">{address}</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{number}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an absolute line number<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the current line&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:." name=":.">:.</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the last line in the file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:$" name=":$">:$</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; equal to 1,$ (the entire file)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:%" name=":%">:%</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position of mark t (lowercase)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:'" name=":'">:'</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position of mark T (uppercase); when the mark is in<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;another file it cannot be used in a range<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<span class="Special">{pattern}</span>[/]&nbsp;&nbsp; the next line where&nbsp;<span class="Special">{pattern}</span>&nbsp;matches&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:/" name=":/">:/</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?<span class="Special">{pattern}</span>[?]&nbsp;&nbsp; the previous line where&nbsp;<span class="Special">{pattern}</span>&nbsp;matches&nbsp;<a class="Constant" href="cmdline.html#:?" name=":?">:?</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the next line where the previously used search<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pattern matches<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the previous line where the previously used search<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pattern matches<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the next line where the previously used substitute<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pattern matches<br>
<br>
Each may be followed (several times) by '+' or '-' and an optional number.<br>
This number is added or subtracted from the preceding line number.&nbsp;&nbsp;If the<br>
number is omitted, 1 is used.<br>
<br>
The &quot;/&quot; and &quot;?&quot; after&nbsp;<span class="Special">{pattern}</span>&nbsp;are required to separate the pattern from<br>
anything that follows.<br>
<br>
The &quot;/&quot; and &quot;?&quot; may be preceded with another address.&nbsp;&nbsp;The search starts from<br>
there.&nbsp;&nbsp;The difference from using ';' is that the cursor isn't moved.<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/pat1//pat2/&nbsp;&nbsp;&nbsp;&nbsp;Find line containing &quot;pat2&quot; after line containing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;pat1&quot;, without moving the cursor.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7;/pat2/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find line containing &quot;pat2&quot;, after line 7, leaving<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the cursor in line 7.</div>
<br>
The&nbsp;<span class="Special">{number}</span>&nbsp;must be between 0 and the number of lines in the file.&nbsp;&nbsp;When<br>
using a 0 (zero) this is interpreted as a 1 by most commands.&nbsp;&nbsp;Commands that<br>
use it as a count do use it as a zero (<a class="Identifier" href="tagsrch.html#:tag">:tag</a>,&nbsp;<a class="Identifier" href="tagsrch.html#:pop">:pop</a>, etc).&nbsp;&nbsp;Some commands<br>
interpret the zero as &quot;before the first line&quot; (<a class="Identifier" href="insert.html#:read">:read</a>, search pattern, etc).<br>
<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.+3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; three lines below the cursor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/that/+1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the line below the next line containing &quot;that&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.,$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from current line until end of file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0;/that&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the first line containing &quot;that&quot;, also matches in the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;first line.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1;/that&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the first line after line 1 containing &quot;that&quot;</div>
<br>
Some commands allow for a count after the command.&nbsp;&nbsp;This count is used as the<br>
number of lines to be used, starting with the line given in the last line<br>
specifier (the default is the cursor line).&nbsp;&nbsp;The commands that accept a count<br>
are the ones that use a range but do not have a file name argument (because<br>
a file name can also be a number).<br>
<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:s/x/X/g 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;substitute 'x' by 'X' in the current line and four<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;following lines<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:23d 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delete lines 23, 24, 25 and 26</div>
<br>
<br>
Folds and Range<br>
<br>
When folds are active the line numbers are rounded off to include the whole<br>
closed fold.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="fold.html#fold-behavior">fold-behavior</a>.<br>
<br>
<br>
Reverse Range&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#E493" name="E493">E493</a><br>
<br>
A range should have the lower line number first.&nbsp;&nbsp;If this is not the case, Vim<br>
will ask you if it should swap the line numbers.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">Backwards range given, OK to swap</span><br>
This is not done within the global command &quot;:g&quot;.<br>
<br>
You can use &quot;:silent&quot; before a command to avoid the question, the range will<br>
always be swapped then.<br>
<br>
<br>
Count and Range&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#N:" name="N:">N:</a><br>
<br>
When giving a count before entering &quot;:&quot;, this is translated into:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:.,.+(count - 1)<br>
In words: The&nbsp;<span class="MissingTag">'count'</span>&nbsp;lines at and after the cursor.&nbsp;&nbsp;Example: To delete<br>
three lines:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3:d&lt;CR&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is translated into: .,.+2d&lt;CR&gt;</div>
<br>
<br>
Visual Mode and Range&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#v_:" name="v_:">v_:</a><br>
<br>
<span class="Special">{Visual}</span>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Starts a command-line with the Visual selected lines as a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;range.&nbsp;&nbsp;The code&nbsp;<span class="Comment">:'&lt;,'&gt;</span>&nbsp;is used for this range, which makes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;it possible to select a similar line from the command-line<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;history for repeating a command on different Visually selected<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lines.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When Visual mode was already ended, a short way to use the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visual area for a range is&nbsp;<span class="Comment">:*</span>.&nbsp;&nbsp;This requires that &quot;*&quot; does<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not appear in&nbsp;<a class="Type" href="options.html#'cpo'">'cpo'</a>, see&nbsp;<a class="Identifier" href="options.html#cpo-star">cpo-star</a>.&nbsp;&nbsp;Otherwise you will have<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to type&nbsp;<span class="Comment">:'&lt;,'&gt;</span><br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
5. Ex command-line flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#ex-flags" name="ex-flags">ex-flags</a><br>
<br>
These flags are supported by a selection of Ex commands.&nbsp;&nbsp;They print the line<br>
that the cursor ends up after executing the command:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output like for&nbsp;<a class="Identifier" href="various.html#:list">:list</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add line number<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output like for&nbsp;<a class="Identifier" href="various.html#:print">:print</a><br>
<br>
The flags can be combined, thus &quot;l#&quot; uses both a line number and&nbsp;<a class="Identifier" href="various.html#:list">:list</a>&nbsp;style<br>
output.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. Ex special characters&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-special" name="cmdline-special">cmdline-special</a><br>
<br>
<span class="Todo">Note</span>: These are special characters in the executed command line.&nbsp;&nbsp;If you want<br>
to insert special things while typing you can use the&nbsp;<span class="Special">CTRL-R</span>&nbsp;command.&nbsp;&nbsp;For<br>
example, &quot;%&quot; stands for the current file name, while&nbsp;<span class="Special">CTRL-R</span>&nbsp;% inserts the<br>
current file name right away.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="cmdline.html#c_CTRL-R">c_CTRL-R</a>.<br>
<br>
<span class="Todo">Note</span>:&nbsp;&nbsp;If you want to avoid the effects of special characters in a Vim script<br>
you may want to use&nbsp;<a class="Identifier" href="eval.html#fnameescape()">fnameescape()</a>.&nbsp;&nbsp;Also see&nbsp;<a class="Identifier" href="editing.html#`=">`=</a>.<br>
<br>
<br>
In Ex commands, at places where a file name can be used, the following<br>
characters have a special meaning.&nbsp;&nbsp;These can also be used in the expression<br>
function&nbsp;<a class="Identifier" href="eval.html#expand()">expand()</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is replaced with the current file name.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_%" name=":_%">:_%</a>&nbsp;<a class="Constant" href="cmdline.html#c_%" name="c_%">c_%</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is replaced with the alternate file name.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_#" name=":_#">:_#</a>&nbsp;<a class="Constant" href="cmdline.html#c_#" name="c_#">c_#</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is remembered for every window.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(where n is a number) is replaced with&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_#0" name=":_#0">:_#0</a>&nbsp;<a class="Constant" href="cmdline.html#:_#n" name=":_#n">:_#n</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the file name of buffer n.&nbsp;&nbsp;&quot;#0&quot; is the same as &quot;#&quot;.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#c_#n" name="c_#n">c_#n</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is replaced with all names in the argument list&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_##" name=":_##">:_##</a>&nbsp;<a class="Constant" href="cmdline.html#c_##" name="c_##">c_##</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;concatenated, separated by spaces.&nbsp;&nbsp;Each space in a name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is preceded with a backslash.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&lt;n&nbsp;&nbsp;&nbsp;&nbsp; (where n is a number &gt; 0) is replaced with old&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:_#<" name=":_#&lt;">:_#&lt;</a>&nbsp;<a class="Constant" href="cmdline.html#c_#<" name="c_#&lt;">c_#&lt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file name n.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="starting.html#:oldfiles">:oldfiles</a>&nbsp;or&nbsp;<a class="Identifier" href="eval.html#v:oldfiles">v:oldfiles</a>&nbsp;to get the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#E809" name="E809">E809</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{only when compiled with the&nbsp;</span><a class="Identifier" href="various.html#+eval">+eval</a><span class="Special">&nbsp;and&nbsp;</span><a class="Identifier" href="various.html#+viminfo">+viminfo</a><span class="Special">&nbsp;features}</span><br>
<br>
<span class="Todo">Note</span>&nbsp;that these, except &quot;#&lt;n&quot;, give the file name as it was typed.&nbsp;&nbsp;If an<br>
absolute path is needed (when using the file name from a different directory),<br>
you need to add &quot;:p&quot;.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="cmdline.html#filename-modifiers">filename-modifiers</a>.<br>
<br>
The &quot;#&lt;n&quot; item returns an absolute path, but it will start with &quot;~/&quot; for files<br>
below your home directory.<br>
<br>
<span class="Todo">Note</span>&nbsp;that backslashes are inserted before spaces, so that the command will<br>
correctly interpret the file name.&nbsp;&nbsp;But this doesn't happen for shell<br>
commands.&nbsp;&nbsp;For those you probably have to use quotes (this fails for files<br>
that contain a quote and wildcards):<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:!ls &quot;%&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:r !spell &quot;%&quot;</div>
<br>
To avoid the special meaning of '%' and '#' insert a backslash before it.<br>
Detail: The special meaning is always escaped when there is a backslash before<br>
it, no matter how many backslashes.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">you type:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alternate.file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\#<br>
Also see&nbsp;<a class="Identifier" href="editing.html#`=">`=</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:<cword>" name=":&lt;cword&gt;">:&lt;cword&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#:<cWORD>" name=":&lt;cWORD&gt;">:&lt;cWORD&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#:<cfile>" name=":&lt;cfile&gt;">:&lt;cfile&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#<cfile>" name="&lt;cfile&gt;">&lt;cfile&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:<sfile>" name=":&lt;sfile&gt;">:&lt;sfile&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#<sfile>" name="&lt;sfile&gt;">&lt;sfile&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#:<afile>" name=":&lt;afile&gt;">:&lt;afile&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#<afile>" name="&lt;afile&gt;">&lt;afile&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#:<abuf>" name=":&lt;abuf&gt;">:&lt;abuf&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#<abuf>" name="&lt;abuf&gt;">&lt;abuf&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#:<amatch>" name=":&lt;amatch&gt;">:&lt;amatch&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#<amatch>" name="&lt;amatch&gt;">&lt;amatch&gt;</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#<slnum>" name="&lt;slnum&gt;">&lt;slnum&gt;</a>&nbsp;<a class="Constant" href="cmdline.html#E495" name="E495">E495</a>&nbsp;<a class="Constant" href="cmdline.html#E496" name="E496">E496</a>&nbsp;<a class="Constant" href="cmdline.html#E497" name="E497">E497</a>&nbsp;<a class="Constant" href="cmdline.html#E499" name="E499">E499</a>&nbsp;<a class="Constant" href="cmdline.html#E500" name="E500">E500</a><br>
<span class="Todo">Note</span>: these are typed literally, they are not special keys!<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;cword&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;is replaced with the word under the cursor (like&nbsp;<a class="Identifier" href="pattern.html#star">star</a>)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;cWORD&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;is replaced with the WORD under the cursor (see&nbsp;<a class="Identifier" href="motion.html#WORD">WORD</a>)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;cfile&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;is replaced with the path name under the cursor (like what<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="editing.html#gf">gf</a>&nbsp;uses)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;afile&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;When executing autocommands, is replaced with the file name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for a file read or write.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;abuf&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp; When executing autocommands, is replaced with the currently<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; effective buffer number (for &quot;:r file&quot; and &quot;:so file&quot; it is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the current buffer, the file being read/sourced is not in a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;amatch&gt;</span>&nbsp;&nbsp; When executing autocommands, is replaced with the match for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; which this autocommand was executed.&nbsp;&nbsp;It differs from<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;afile&gt;</span>&nbsp;only when the file name isn't used to match with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (for FileType, Syntax and SpellFileMissing events).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;sfile&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;When executing a &quot;:source&quot; command, is replaced with the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file name of the sourced file.&nbsp;&nbsp;<a class="Constant" href="cmdline.html#E498" name="E498">E498</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When executing a function, is replaced with:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;function&nbsp;<span class="Special">{function-name}</span>[<span class="Special">{lnum}</span>]&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function call nesting is indicated like this:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;function&nbsp;<span class="Special">{function-name1}</span>[<span class="Special">{lnum}</span>]..<span class="Special">{function-name2}</span>[<span class="Special">{lnum}</span>]&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that filename-modifiers are useless when&nbsp;<span class="Special">&lt;sfile&gt;</span>&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; used inside a function.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;slnum&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;When executing a &quot;:source&quot; command, is replaced with the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; line number.&nbsp;&nbsp;<a class="Constant" href="cmdline.html#E842" name="E842">E842</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When executing a function it's the line number relative to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the start of the function.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#filename-modifiers" name="filename-modifiers">filename-modifiers</a><br>
<a class="Constant" href="cmdline.html#:_%:" name=":_%:">:_%:</a>&nbsp;<a class="Constant" href="cmdline.html#::8" name="::8">::8</a>&nbsp;<a class="Constant" href="cmdline.html#::p" name="::p">::p</a>&nbsp;<a class="Constant" href="cmdline.html#::." name="::.">::.</a>&nbsp;<a class="Constant" href="cmdline.html#::~" name="::~">::~</a>&nbsp;<a class="Constant" href="cmdline.html#::h" name="::h">::h</a>&nbsp;<a class="Constant" href="cmdline.html#::t" name="::t">::t</a>&nbsp;<a class="Constant" href="cmdline.html#::r" name="::r">::r</a>&nbsp;<a class="Constant" href="cmdline.html#::e" name="::e">::e</a>&nbsp;<a class="Constant" href="cmdline.html#::s" name="::s">::s</a>&nbsp;<a class="Constant" href="cmdline.html#::gs" name="::gs">::gs</a>&nbsp;<a class="Constant" href="cmdline.html#::S" name="::S">::S</a><br>
<span class="Statement">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a class="Constant" href="cmdline.html#%:8" name="%:8">%:8</a>&nbsp;<a class="Constant" href="cmdline.html#%:p" name="%:p">%:p</a>&nbsp;<a class="Constant" href="cmdline.html#%:." name="%:.">%:.</a>&nbsp;<a class="Constant" href="cmdline.html#%:~" name="%:~">%:~</a>&nbsp;<a class="Constant" href="cmdline.html#%:h" name="%:h">%:h</a>&nbsp;<a class="Constant" href="cmdline.html#%:t" name="%:t">%:t</a>&nbsp;<a class="Constant" href="cmdline.html#%:r" name="%:r">%:r</a>&nbsp;<a class="Constant" href="cmdline.html#%:e" name="%:e">%:e</a>&nbsp;<a class="Constant" href="cmdline.html#%:s" name="%:s">%:s</a>&nbsp;<a class="Constant" href="cmdline.html#%:gs" name="%:gs">%:gs</a>&nbsp;<a class="Constant" href="cmdline.html#%:S" name="%:S">%:S</a><br>
The file name modifiers can be used after &quot;%&quot;, &quot;#&quot;, &quot;#n&quot;, &quot;<span class="Special">&lt;cfile&gt;</span>&quot;, &quot;<span class="Special">&lt;sfile&gt;</span>&quot;,<br>
&quot;<span class="Special">&lt;afile&gt;</span>&quot; or &quot;<span class="Special">&lt;abuf&gt;</span>&quot;.&nbsp;&nbsp;They are also used with the&nbsp;<a class="Identifier" href="eval.html#fnamemodify()">fnamemodify()</a>&nbsp;function.<br>
These are not available when Vim has been compiled without the&nbsp;<a class="Identifier" href="various.html#+modify_fname">+modify_fname</a><br>
feature.<br>
These modifiers can be given, in this order:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make file name a full path.&nbsp;&nbsp;Must be the first modifier.&nbsp;&nbsp;Also<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changes &quot;~/&quot; (and &quot;~user/&quot; for Unix and VMS) to the path for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the home directory.&nbsp;&nbsp;If the name is a directory a path<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separator is added at the end.&nbsp;&nbsp;For a file name that does not<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exist and does not have an absolute path the result is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unpredictable.&nbsp;&nbsp;On MS-Windows an 8.3 filename is expanded to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the long name.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the path to 8.3 short format (currently only on<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MS-Windows).&nbsp;&nbsp;Will act on as much of a path that is an<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;existing path.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reduce file name to be relative to the home directory, if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;possible.&nbsp;&nbsp;File name is unmodified if it is not below the home<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reduce file name to be relative to current directory, if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;possible.&nbsp;&nbsp;File name is unmodified if it is not below the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current directory.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For maximum shortness, use &quot;:~:.&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Head of the file name (the last component and any separators<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removed).&nbsp;&nbsp;Cannot be used with :e, :r or :t.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Can be repeated to remove several components at the end.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When the file name ends in a path separator, only the path<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separator is removed.&nbsp;&nbsp;Thus &quot;:p:h&quot; on a directory name results<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on the directory name itself (without trailing slash).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When the file name is an absolute path (starts with &quot;/&quot; for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unix; &quot;x:\&quot; for MS-DOS, WIN32, OS/2; &quot;drive:&quot; for Amiga), that<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;part is not removed.&nbsp;&nbsp;When there is no head (path is relative<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to current directory) the result is empty.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tail of the file name (last component of the name).&nbsp;&nbsp;Must<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;precede any :r or :e.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Root of the file name (the last extension removed).&nbsp;&nbsp;When<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;there is only an extension (file name that starts with '.',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.g., &quot;.vimrc&quot;), it is not removed.&nbsp;&nbsp;Can be repeated to remove<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;several extensions (last one first).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extension of the file name.&nbsp;&nbsp;Only makes sense when used alone.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When there is no extension the result is empty.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When there is only an extension (file name that starts with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.'), the result is empty.&nbsp;&nbsp;Can be repeated to include more<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extensions.&nbsp;&nbsp;If there are not enough extensions (but at least<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;one) as much as possible are included.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:s?pat?sub?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Substitute the first occurrence of &quot;pat&quot; with &quot;sub&quot;.&nbsp;&nbsp;This<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;works like the&nbsp;<a class="Identifier" href="change.html#:s">:s</a>&nbsp;command.&nbsp;&nbsp;&quot;pat&quot; is a regular expression.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Any character can be used for '?', but it must not occur in<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;pat&quot; or &quot;sub&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After this, the previous modifiers can be used again.&nbsp;&nbsp;For<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;example &quot;:p&quot;, to make a full path after the substitution.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:gs?pat?sub?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Substitute all occurrences of &quot;pat&quot; with &quot;sub&quot;.&nbsp;&nbsp;Otherwise<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this works like &quot;:s&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Escape special characters for use with a shell command (see<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="eval.html#shellescape()">shellescape()</a>). Must be the last one. Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:!dir &lt;cfile&gt;:S<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:call system('chmod +w -- ' . expand('%:S'))</div>
<br>
Examples, when the file name is &quot;src/version.c&quot;, current dir<br>
&quot;/home/mool/vim&quot;:<br>
<div class="helpExample">&nbsp;&nbsp;:p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim/src/version.c<br>
&nbsp;&nbsp;:p:.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/version.c<br>
&nbsp;&nbsp;:p:~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~/vim/src/version.c<br>
&nbsp;&nbsp;:h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src<br>
&nbsp;&nbsp;:p:h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim/src<br>
&nbsp;&nbsp;:p:h:h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim<br>
&nbsp;&nbsp;:t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version.c<br>
&nbsp;&nbsp;:p:t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version.c<br>
&nbsp;&nbsp;:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/version<br>
&nbsp;&nbsp;:p:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim/src/version<br>
&nbsp;&nbsp;:t:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version<br>
&nbsp;&nbsp;:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c<br>
&nbsp;&nbsp;:s?version?main?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/main.c<br>
&nbsp;&nbsp;:s?version?main?:p&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim/src/main.c<br>
&nbsp;&nbsp;:p:gs?/?\\?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \home\mool\vim\src\version.c</div>
<br>
Examples, when the file name is &quot;src/version.c.gz&quot;:<br>
<div class="helpExample">&nbsp;&nbsp;:p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/home/mool/vim/src/version.c.gz<br>
&nbsp;&nbsp;:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gz<br>
&nbsp;&nbsp;:e:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c.gz<br>
&nbsp;&nbsp;:e:e:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c.gz<br>
&nbsp;&nbsp;:e:e:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c<br>
&nbsp;&nbsp;:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/version.c<br>
&nbsp;&nbsp;:r:e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c<br>
&nbsp;&nbsp;:r:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/version<br>
&nbsp;&nbsp;:r:r:r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/version</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#extension-removal" name="extension-removal">extension-removal</a>&nbsp;<a class="Constant" href="cmdline.html#:_%<" name=":_%&lt;">:_%&lt;</a><br>
If a &quot;&lt;&quot; is appended to &quot;%&quot;, &quot;#&quot;, &quot;#n&quot; or &quot;<span class="Special">CTRL-V</span>&nbsp;p&quot; the extension of the file<br>
name is removed (everything after and including the last '.' in the file<br>
name).&nbsp;&nbsp;This is included for backwards compatibility with version 3.0, the<br>
&quot;:r&quot; form is preferred.&nbsp;&nbsp;Examples:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current file name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current file name without extension<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternate file name for current window<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem, without extension<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#31&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alternate file number 31<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#31&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem, without extension<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cword&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; word under the cursor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cWORD&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WORD under the cursor (see |WORD|)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cfile&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path name under the cursor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cfile&gt;&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem, without extension</div>
<br>
<span class="Todo">Note</span>: Where a file name is expected wildcards expansion is done.&nbsp;&nbsp;On Unix the<br>
shell is used for this, unless it can be done internally (for speed).<br>
Unless in&nbsp;<a class="Identifier" href="starting.html#restricted-mode">restricted-mode</a>, backticks work also, like in<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:n `echo *.c`</div>
But expansion is only done if there are any wildcards before expanding the<br>
'%', '#', etc..&nbsp;&nbsp;This avoids expanding wildcards inside a file name.&nbsp;&nbsp;If you<br>
want to expand the result of&nbsp;<span class="Special">&lt;cfile&gt;</span>, add a wildcard character to it.<br>
Examples: (alternate file name is &quot;?readme?&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expands to&nbsp;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e ?readme?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e `ls #`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :e {files matching &quot;?readme?&quot;}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e #.*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:e {files matching &quot;?readme?.*&quot;}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cd&nbsp;<span class="Special">&lt;cfile&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp; :cd {file name under cursor}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cd&nbsp;<span class="Special">&lt;cfile&gt;</span>*&nbsp;&nbsp;&nbsp;&nbsp;:cd {file name under cursor plus &quot;*&quot; and then expanded}<br>
Also see&nbsp;<a class="Identifier" href="editing.html#`=">`=</a>.<br>
<br>
When the expanded argument contains a &quot;!&quot; and it is used for a shell command<br>
(&quot;:!cmd&quot;, &quot;:r !cmd&quot; or &quot;:w !cmd&quot;), the &quot;!&quot; is escaped with a backslash to<br>
avoid it being expanded into a previously used command.&nbsp;&nbsp;When the&nbsp;<a class="Type" href="options.html#'shell'">'shell'</a><br>
option contains &quot;sh&quot;, this is done twice, to avoid the shell trying to expand<br>
the &quot;!&quot;.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#filename-backslash" name="filename-backslash">filename-backslash</a><br>
For filesystems that use a backslash as directory separator (MS-DOS, Windows,<br>
OS/2), it's a bit difficult to recognize a backslash that is used to escape<br>
the special meaning of the next character.&nbsp;&nbsp;The general rule is: If the<br>
backslash is followed by a normal file name character, it does not have a<br>
special meaning.&nbsp;&nbsp;Therefore &quot;\file\foo&quot; is a valid file name, you don't have<br>
to type the backslash twice.<br>
<br>
An exception is the '$' sign.&nbsp;&nbsp;It is a valid character in a file name.&nbsp;&nbsp;But<br>
to avoid a file name like &quot;$home&quot; to be interpreted as an environment variable,<br>
it needs to be preceded by a backslash.&nbsp;&nbsp;Therefore you need to use &quot;/\$home&quot;<br>
for the file &quot;$home&quot; in the root directory.&nbsp;&nbsp;A few examples:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">FILE NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTERPRETED AS</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expanded to value of environment var $home<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\$home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file &quot;$home&quot; in current directory<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/\$home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file &quot;$home&quot; in root directory<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\$home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file &quot;\\&quot;, followed by expanded $home<br>
<br>
Also see&nbsp;<a class="Identifier" href="editing.html#`=">`=</a>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. Command-line window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdline-window" name="cmdline-window">cmdline-window</a>&nbsp;<a class="Constant" href="cmdline.html#cmdwin" name="cmdwin">cmdwin</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#command-line-window" name="command-line-window">command-line-window</a><br>
In the command-line window the command line can be edited just like editing<br>
text in any window.&nbsp;&nbsp;It is a special kind of window, because you cannot leave<br>
it in a normal way.<br>
<span class="Special">{not available when compiled without the&nbsp;</span><a class="Identifier" href="various.html#+cmdline_hist">+cmdline_hist</a><span class="Special">&nbsp;or&nbsp;</span><a class="Identifier" href="various.html#+vertsplit">+vertsplit</a><br>
<span class="Special">feature}</span><br>
<br>
<br>
<span class="Statement">OPEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a class="Constant" href="cmdline.html#c_CTRL-F" name="c_CTRL-F">c_CTRL-F</a>&nbsp;<a class="Constant" href="cmdline.html#q:" name="q:">q:</a>&nbsp;<a class="Constant" href="cmdline.html#q/" name="q/">q/</a>&nbsp;<a class="Constant" href="cmdline.html#q?" name="q?">q?</a><br>
<br>
There are two ways to open the command-line window:<br>
1. From Command-line mode, use the key specified with the&nbsp;<a class="Type" href="options.html#'cedit'">'cedit'</a>&nbsp;option.<br>
&nbsp;&nbsp; The default is&nbsp;<span class="Special">CTRL-F</span>&nbsp;when&nbsp;<a class="Type" href="options.html#'compatible'">'compatible'</a>&nbsp;is not set.<br>
2. From Normal mode, use the &quot;q:&quot;, &quot;q/&quot; or &quot;q?&quot; command.<br>
&nbsp;&nbsp; This starts editing an Ex command-line (&quot;q:&quot;) or search string (&quot;q/&quot; or<br>
&nbsp;&nbsp; &quot;q?&quot;).&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that this is not possible while recording is in progress (the<br>
&nbsp;&nbsp; &quot;q&quot; stops recording then).<br>
<br>
When the window opens it is filled with the command-line history.&nbsp;&nbsp;The last<br>
line contains the command as typed so far.&nbsp;&nbsp;The left column will show a<br>
character that indicates the type of command-line being edited, see<br>
<a class="Identifier" href="cmdline.html#cmdwin-char">cmdwin-char</a>.<br>
<br>
Vim will be in Normal mode when the editor is opened, except when&nbsp;<a class="Type" href="options.html#'insertmode'">'insertmode'</a><br>
is set.<br>
<br>
The height of the window is specified with&nbsp;<a class="Type" href="options.html#'cmdwinheight'">'cmdwinheight'</a>&nbsp;(or smaller if there<br>
is no room).&nbsp;&nbsp;The window is always full width and is positioned just above the<br>
command-line.<br>
<br>
<br>
EDIT<br>
<br>
You can now use commands to move around and edit the text in the window.&nbsp;&nbsp;Both<br>
in Normal mode and Insert mode.<br>
<br>
It is possible to use &quot;:&quot;, &quot;/&quot; and other commands that use the command-line,<br>
but it's not possible to open another command-line window then.&nbsp;&nbsp;There is no<br>
nesting.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#E11" name="E11">E11</a><br>
The command-line window is not a normal window.&nbsp;&nbsp;It is not possible to move to<br>
another window or edit another buffer.&nbsp;&nbsp;All commands that would do this are<br>
disabled in the command-line window.&nbsp;&nbsp;Of course it _is_ possible to execute<br>
any command that you entered in the command-line window.&nbsp;&nbsp;Other text edits are<br>
discarded when closing the window.<br>
<br>
<br>
<span class="Statement">CLOSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a class="Constant" href="cmdline.html#E199" name="E199">E199</a><br>
<br>
There are several ways to leave the command-line window:<br>
<br>
<span class="Special">&lt;CR&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the command-line under the cursor.&nbsp;&nbsp;Works both in<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert and in Normal mode.<br>
<span class="Special">CTRL-C</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Continue in Command-line mode.&nbsp;&nbsp;The command-line under the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cursor is used as the command-line.&nbsp;&nbsp;Works both in Insert and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in Normal mode.&nbsp;&nbsp;There is no redraw, thus the window will<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remain visible.<br>
:quit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Discard the command line and go back to Normal mode.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;:close&quot;, &quot;:exit&quot;, &quot;:xit&quot; and&nbsp;<span class="Special">CTRL-\</span>&nbsp;<span class="Special">CTRL-N</span>&nbsp;also work.<br>
:qall&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Quit Vim, unless there are changes in some buffer.<br>
:qall!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit Vim, discarding changes to any buffer.<br>
<br>
Once the command-line window is closed the old window sizes are restored.&nbsp;&nbsp;The<br>
executed command applies to the window and buffer where the command-line was<br>
started from.&nbsp;&nbsp;This works as if the command-line window was not there, except<br>
that there will be an extra screen redraw.<br>
The buffer used for the command-line window is deleted.&nbsp;&nbsp;Any changes to lines<br>
other than the one that is executed with&nbsp;<span class="Special">&lt;CR&gt;</span>&nbsp;are lost.<br>
<br>
If you would like to execute the command under the cursor and then have the<br>
command-line window open again, you may find this mapping useful:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:autocmd CmdwinEnter * map &lt;buffer&gt; &lt;F5&gt; &lt;CR&gt;q:</div>
<br>
<br>
VARIOUS<br>
<br>
The command-line window cannot be used:<br>
- when there already is a command-line window (no nesting)<br>
- for entering an encryption key or when using inputsecret()<br>
- when Vim was not compiled with the&nbsp;<a class="Identifier" href="various.html#+vertsplit">+vertsplit</a>&nbsp;feature<br>
<br>
Some options are set when the command-line window is opened:<br>
<a class="Type" href="options.html#'filetype'">'filetype'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;vim&quot;, when editing an Ex command-line; this starts Vim syntax<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highlighting if it was enabled<br>
<a class="Type" href="options.html#'rightleft'">'rightleft'</a>&nbsp;&nbsp;&nbsp;&nbsp; off<br>
<a class="Type" href="options.html#'modifiable'">'modifiable'</a>&nbsp;&nbsp;&nbsp;&nbsp;on<br>
<a class="Type" href="options.html#'buftype'">'buftype'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;nofile&quot;<br>
<a class="Type" href="options.html#'swapfile'">'swapfile'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;off<br>
<br>
It is allowed to write the buffer contents to a file.&nbsp;&nbsp;This is an easy way to<br>
save the command-line history and read it back later.<br>
<br>
If the&nbsp;<a class="Type" href="options.html#'wildchar'">'wildchar'</a>&nbsp;option is set to&nbsp;<span class="Special">&lt;Tab&gt;</span>, and the command-line window is used<br>
for an Ex command, then two mappings will be added to use&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;for completion<br>
in the command-line window, like this:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:imap &lt;buffer&gt; &lt;Tab&gt; &lt;C-X&gt;&lt;C-V&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:nmap &lt;buffer&gt; &lt;Tab&gt; a&lt;C-X&gt;&lt;C-V&gt;</div>
<span class="Todo">Note</span>&nbsp;that hitting&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;in Normal mode will do completion on the next<br>
character.&nbsp;&nbsp;That way it works at the end of the line.<br>
If you don't want these mappings, disable them with:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;au CmdwinEnter [:&gt;] iunmap &lt;Tab&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;au CmdwinEnter [:&gt;] nunmap &lt;Tab&gt;</div>
You could put these lines in your vimrc file.<br>
<br>
While in the command-line window you cannot use the mouse to put the cursor in<br>
another window, or drag statuslines of other windows.&nbsp;&nbsp;You can drag the<br>
statusline of the command-line window itself and the statusline above it.<br>
Thus you can resize the command-line window, but not others.<br>
<br>
The&nbsp;<a class="Identifier" href="eval.html#getcmdwintype()">getcmdwintype()</a>&nbsp;function returns the type of the command-line being<br>
edited as described in&nbsp;<a class="Identifier" href="cmdline.html#cmdwin-char">cmdwin-char</a>.<br>
<br>
<br>
AUTOCOMMANDS<br>
<br>
Two autocommand events are used:&nbsp;<a class="Identifier" href="autocmd.html#CmdwinEnter">CmdwinEnter</a>&nbsp;and&nbsp;<a class="Identifier" href="autocmd.html#CmdwinLeave">CmdwinLeave</a>.&nbsp;&nbsp;Since this<br>
window is of a special type, the WinEnter, WinLeave, BufEnter and BufLeave<br>
events are not triggered.&nbsp;&nbsp;You can use the Cmdwin events to do settings<br>
specifically for the command-line window.&nbsp;&nbsp;Be careful not to cause side<br>
effects!<br>
Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:au CmdwinEnter :&nbsp;&nbsp;let b:cpt_save = &amp;cpt | set cpt=.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:au CmdwinLeave :&nbsp;&nbsp;let &amp;cpt = b:cpt_save</div>
This sets&nbsp;<a class="Type" href="options.html#'complete'">'complete'</a>&nbsp;to use completion in the current window for&nbsp;<a class="Identifier" href="insert.html#i_CTRL-N">i_CTRL-N</a>.<br>
Another example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:au CmdwinEnter [/?]&nbsp;&nbsp;startinsert</div>
This will make Vim start in Insert mode in the command-line window.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="cmdline.html#cmdwin-char" name="cmdwin-char">cmdwin-char</a><br>
The character used for the pattern indicates the type of command-line:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; normal Ex command<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug mode command&nbsp;<a class="Identifier" href="repeat.html#debug-mode">debug-mode</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward search string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; backward search string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expression for &quot;=&nbsp;<a class="Identifier" href="eval.html#expr-register">expr-register</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string for&nbsp;<a class="Identifier" href="eval.html#input()">input()</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text for&nbsp;<a class="Identifier" href="insert.html#:insert">:insert</a>&nbsp;or&nbsp;<a class="Identifier" href="insert.html#:append">:append</a><br>
<br>
&nbsp;vim:tw=78:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
